CREATE TABLE [dbo].[TDLOGS_ACCE]
(
[CO_SIST] [dbo].[TD_VC_008] NOT NULL,
[CO_MODU] [dbo].[TD_VC_008] NOT NULL,
[CO_MENU] [dbo].[TD_VC_020] NOT NULL,
[CO_USUA] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDLOGS_AC__NU_SE__164452B1] DEFAULT ((0)),
[FE_ACCE] [dbo].[TD_DT_001] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008] NULL,
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDLOGS_AC__FE_US__173876EA] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008] NULL,
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDLOGS_AC__FE_US__182C9B23] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDLOGS_ACCE] ADD CONSTRAINT [PK__TDLOGS_A__C94D97655B0E7E4A] PRIMARY KEY CLUSTERED  ([CO_SIST], [CO_MODU], [CO_MENU], [CO_USUA], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDLOGS_ACCE] ADD CONSTRAINT [FK__TDLOGS_ACCE__216BEC9A] FOREIGN KEY ([CO_SIST], [CO_MODU], [CO_MENU]) REFERENCES [dbo].[TMMENU] ([CO_SIST], [CO_MODU], [CO_MENU])
GO
ALTER TABLE [dbo].[TDLOGS_ACCE] ADD CONSTRAINT [FK__TDLOGS_AC__CO_US__2077C861] FOREIGN KEY ([CO_USUA]) REFERENCES [dbo].[TMUSUA] ([CO_USUA])
GO
GRANT SELECT ON  [dbo].[TDLOGS_ACCE] TO [public]
GRANT INSERT ON  [dbo].[TDLOGS_ACCE] TO [public]
GRANT DELETE ON  [dbo].[TDLOGS_ACCE] TO [public]
GRANT UPDATE ON  [dbo].[TDLOGS_ACCE] TO [public]
GO
